package com.atguigu.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassNAME RabbitMQListener
 * @Description
 * @Author wuyafeng atguigu
 * @Date 2021/12/1 21:10
 * @Version 1.0
 **/
@Component
public class RabbitMQListener {

    @RabbitListener(queues = "boot_queue")
    public void listenerQueue(Message message){
        System.out.println("消息：" + new String(message.getBody()));
    }
}
